package cn.com.greatwall.search.client.feign;

import java.util.Map;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import cn.com.greatwall.common.constant.ServiceNameConstants;
import cn.com.greatwall.search.client.feign.fallback.SearchServiceFallbackFactory;

/**
 * @Author herw
 * @Time 2022-01-26 10:49:38
 * @Version 1.0
 * @Description: TODO(用一句话描述该文件做什么)
 */
@FeignClient(name = ServiceNameConstants.SEARCH_SERVICE, fallbackFactory = SearchServiceFallbackFactory.class, decode404 = true)
public interface AggregationService {
    /**
     * 查询文档列表
     * @param indexName 索引名
     * @param routing es的路由
     */
    @GetMapping(value = "/agg/requestStat/{indexName}/{routing}")
    Map<String, Object> requestStatAgg(@PathVariable("indexName") String indexName, @PathVariable("routing") String routing);
}
